using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using Jupiter.Infrastructure;

namespace Wips.Domain.Models.Authorities.Model
{
    /// <summary>
    /// 权限
    /// </summary>
    [Table("AuthorityPermissions")]
    [SugarTable("AuthorityPermissions")]
    public class Permission : EntityBase, IAggregateRoot
    {
        /// <summary>
        /// 权限类型
        /// </summary>
        /// <value></value>
        public AuthoritiePermissionType PermissionType { get; set; }

        public Permission()
        {
        }

        public Permission(AuthoritiePermissionType permissionType)
        {
            PermissionType = permissionType;
            Id = ObjectId.GenerateNewStringId();
        }
    }

    /// <summary>
    /// 权限类型
    /// </summary>
    public enum AuthoritiePermissionType
    {
        /// <summary>
        /// 菜单
        /// </summary>
        [Description("菜单")] Menu = 1,

        /// <summary>
        /// 操作
        /// </summary>
        [Description("操作")] Operation = 2
    }
}